<ion-content>
  <ion-grid>
    <ion-row class="ion-align-items-center">
      <ion-col>
        <ion-card color="dark">
          <ion-card-header class="ion-text-center">
            <ion-card-title>Transfer</ion-card-title>
            <div class="center-wrapper">
              <ion-card-subtitle>
                Select the physical drive containing your StartOS data
              </ion-card-subtitle>
            </div>
          </ion-card-header>

          <ion-card-content class="ion-margin">
            <ion-spinner
              *ngIf="loading"
              class="center-spinner"
              name="lines"
            ></ion-spinner>

            <!-- loaded -->
            <ion-item-group *ngIf="!loading" class="ion-text-center">
              <!-- drives -->
              <ng-container *ngFor="let drive of drives">
                <ion-item
                  *ngIf="drive | guid as guid"
                  button
                  (click)="select(guid)"
                  lines="none"
                >
                  <ion-icon
                    slot="start"
                    name="save-outline"
                    size="large"
                  ></ion-icon>
                  <ion-label>
                    <h1>{{ drive.logicalname }}</h1>
                    <p>
                      {{ drive.vendor || 'Unknown Vendor' }} - {{ drive.model ||
                      'Unknown Model' }}
                    </p>
                    <p>Capacity: {{ drive.capacity | convertBytes }}</p>
                  </ion-label>
                </ion-item>
              </ng-container>
              <ion-button
                class="ion-margin-top"
                color="primary"
                (click)="refresh()"
              >
                <ion-icon slot="start" name="refresh"></ion-icon>
                Refresh
              </ion-button>
            </ion-item-group>
          </ion-card-content>
        </ion-card>
      </ion-col>
    </ion-row>
  </ion-grid>
</ion-content>
